﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class forecastpost_add : System.Web.UI.Page
{
    protected static string foreast = "";
    protected static int id = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindData();
        }
    }
    void bindData()
    {
        if (Request["id"] != null)
        {
            id = Convert.ToInt32(Request["id"]);
            string sql = "select * from ForecastPost where id='" + Request["id"] + "'";
            Model.ForecastPost forecastPost = BLL.ForecastPost.NewsTopOne(sql);
            if (forecastPost != null)
            {
                foreast = forecastPost.Content;//用户真实姓名
                lotteryType.Value = forecastPost.LotteryType.ToString();
                postType.Value = forecastPost.PostType;
                title.Value = forecastPost.Title;
            }
        }
        else
        {
            foreast = "";
            id = 0;
        }
    }
}